import POJO.MoviePerformer;
import dao.MoviePerformerDAO;
import dao.MoviePerformerDAOImpl;

import java.util.List;

/**
 * @auther 尚智江
 * @Date 2022/5/5 23:17
 */
public class QUeryBynameTest {
    public static void main(String[] args) {
        // 按姓名查询 刘嘉玲 的数据集合
        MoviePerformerDAO moviePerformerDAO = new MoviePerformerDAOImpl();
        List<MoviePerformer> list = moviePerformerDAO.queryByName("刘嘉玲");
        for (MoviePerformer performer : list) {
            System.out.println(performer.getId()+" "+performer.getMovieTitle() + " " +
                    performer.getName() + " " + performer.getRepresentive());
        }
    }
}
